<script src='style/js/jquery.js'></script>
<select name="grade" id="grade">
	<option value="请选择">请选择</option>
	@foreach($city as $v)
		<option value="{{$v->city_id}}" id='g'>{{$v->city_name}}</option>
	@endforeach
</select>
<select name="classes" id="classes"></select>

<script>
	$('#grade').change(function(){
		var objectModel ={};
		var city_id=$(this).val();
		var type=$(this).attr('id');
		objectModel[type]=city_id;
		console.log('array')
		 $.ajax({  
                   url:"test1", //你的路由地址  
                   type:"post",  
                   dataType:"json",  
                   data:objectModel,  
                   timeout:30000,  
                   success:function(data){ 
                   	
                       $("#classes").empty(); 
                       var i=0;
                       var b="";
                       for(i=0;i<data.length;i++){
                       	 b+="<option value='"+data[i].city_id+"'>"+data[i].city_name+"</option>";
                       }
                       $("#classes").append(b);
  
                   }  
               });  
           });  
</script>